package com.smartao.base.menu;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.smartao.core.dao.BaseDao;
import com.smartao.core.service.BaseEntityService;

@Service
public class MenuServiceImpl extends BaseEntityService<Menu, Long> implements MenuService{
	@Autowired
	private MenuDao menuDao;

	@Override
	protected BaseDao<Menu, Long> getDao() {
		return menuDao;
	}

	@Override
	public List<Menu> findByMenutype(MenuType menutype) {
		return menuDao.findByMenutype(menutype);
	}

	@Override
	public List<Menu> findSubMenuByMenutype(Long parent,MenuType menutype) {
		return menuDao.findSubMenuByMenutype(parent,menutype);
	}
	
	@Override
	public void updateVisibility(Long id, boolean visible){
		menuDao.updateVisibility(id, visible);
	}

}
